<?php
/*
 * redis自动连接
 */

namespace Common\Logic;

class RedisLogic{

    //redis连接
    public function connect()
    {
        $aRedisConfig = C('redis_config');
        $redis  = new \Redis();
        $redis->connect($aRedisConfig['host'], $aRedisConfig['port']);
        $redis->auth($aRedisConfig['password']);
        $redis->select($aRedisConfig['db']);
        return $redis;
    }

}